package com.gdssoft.pdaweb.service.am;
/*
 *  捷达世软件（深圳）有限公司
 *  Copyright (C) 2008-2010 ShenZhen JieDaShi Software Limited Company.
*/
import java.io.File;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;

import com.gdssoft.core.command.QueryFilter;
import com.gdssoft.core.service.BaseService;
import com.gdssoft.pdaweb.model.am.AmPlan;
import com.gdssoft.pdaweb.model.am.PdaAmMeterList;
import com.gdssoft.pdaweb.model.water.PdaWaterList;


public interface PdaAmMeterListService extends BaseService<PdaAmMeterList>{
	

	/**
	 * 检查Excel表的格式
	 * @author F3230006
	 * @param file
	 * @return error PdaAmMeterList List
	 */
	public List<PdaAmMeterList> checkXLSFormat(String importMonth,File file);
	/**
	 * 查询
	 * @param pdaAmMeterList
	 * @return
	 */
	public List<PdaAmMeterList> query(PdaAmMeterList pdaAmMeterList,int start,int to);
	
	/**
	 * 查数
	 * @author F3229233 2013-1-15 下午3:36:49 
	 * @param pdaAmMeterList
	 * @return
	 */
	public int queryCount(PdaAmMeterList pdaAmMeterList);
		
	
	/**
	 * 导出excel
	 * @author F3229233 2013-1-15 上午9:13:07 
	 * @param response HttpServletResponse
	 * @param pdaAmMeterList 生成依据
	 * @param user	操作人
	 */
	public void excelExport(HttpServletResponse response,
			PdaAmMeterList pdaAmMeterList,String user,String deptId);
	
	/**
	 * 保存excel表的内容
	 * @param importMonth
	 * @param file
	 * @return
	 */
	public int saveExcel(String importMonth, File file);

	/**
	 * 检查am_id是否存在
	 * @author F3230006
	 * @param amId
	 * @return
	 */
	public boolean checkAmidExist(String amId,String depIdS);

	/**
	 * 检查记录是否存在
	 * @author F3230006
	 * @param amId
	 * @param importMonth
	 * @return
	 */
	public boolean recodExist(String amId, String importMonth);

	/**
	 * 检查是否异常
	 * @author F3230006
	 * @param amId
	 * @param degree
	 * @param month
	 * @return
	 */
	public String checkNomal(String amId, Long degree, String month);

	/**
	 * 获得电表读数
	 * @author F3230006
	 * @param amId
	 * @param month
	 * @return
	 */
	public Long getDegreeByTime(String amId,String month);


	/**
	 * 更新记录id in ids 的记录状态为status
	 * @author F3229233 2013-1-17 上午10:25:28 
	 * @param ids = '112,22,45'
	 * @param status
	 * @return
	 */
	public boolean check(String ids, String status);
	
	/**
	 * 按月查询 
	 * @author F3229233 2013-4-15 下午4:00:58 
	 * @param params
	 * @param month
	 * @return
	 */
	public List<PdaAmMeterList> getList(Map params,String month);
	
	public int getListCount(Map params, String depIds);
	/**
	 * 不按月查询 	
	 */
	public List<PdaAmMeterList> getSearchList(QueryFilter filter);
	
	public boolean saveFixedUsage(PdaAmMeterList pdaAmMeterList);
	/*
	 *待審核的計劃列表 
	 */
	public List<AmPlan> getPlanList(String month,String planName,String executor,String dptId,QueryFilter filter);

	/*
	 *待審核的計劃列表 
	 *数量
	 */
	public int getPlanListNum(String month,String planName,String executor,String dptId);

	/**
	 * 按照計劃審核跟新資料狀態，status
	 */
	public boolean checkPlan(String ids, String status,String month);
	
	/**
	 * 根據表ID和月份得到上月讀書
	 */
	public long getPdaAmMeterList(PdaAmMeterList pdaAmMeterList);
	/**
	 * 审核明细查询
	 */
	public List<PdaAmMeterList> getCheckDetailSearch(String planId,String planName ,String month,	
			            String executor,String fangId,	String waterId,	String dongId,String quId,String depId,QueryFilter filter);
	
	/**
	 * 审核明细查询状态编译
	 */
	public List<PdaAmMeterList> checkStatus(Long planId,String month);
	/**
	 * 审核明细查询数量
	 */
	public int getCheckDetailSearchNumb(String planId,String planName ,String month,	
			            String executor,String fangId,	String waterId,	String dongId,String quId,String depId);
	

}


